from flask import Blueprint
from controllers.rootheal_controller import analyze_fault

rootheal_bp = Blueprint('rootheal', __name__)

# 新增：分析故障的路由
@rootheal_bp.route('/analyze-fault', methods=['POST'])  # 修改这行，使用相对路径
def analyze_fault_route():
    from flask import request
    return analyze_fault(request)